package designpattern.factoryMethod;

/**
 * 具体实现工厂
 * 工厂模式的核心思想是：
 * the Factory Method pattern uses inheritance
 * and relies on a subclass to handle the desired object instantiation
 */
public class RoomFactory extends MazeFactory{

    public void doSomething(){
        Room room= (Room) getMapSite();
        room.enter();
    }

    @Override
    public MapSite getMapSite() {
        return new Room();
    }

}
